//
//  Contact.m
//  04-集合(二)
//
//  Created by 402030900@qq.com on 16/7/7.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "Contact.h"

@implementation Contact

-(instancetype)initWithName:(NSString *)name tel:(NSString *)tel {
    self = [super init];
    if (self) {
        //初始化方法中,不要使用set方法赋值(self.)
        _name = name;
        _tel = tel;
    }
    return self;
}
-(NSString *)description{
    return [NSString stringWithFormat:@"name = %@,tel = %@,sex = %@,address = %@,groupName = %@,age = %ld",_name,_tel,_sex,_address,_groupName,_age];
}
-(void)showContact {
    NSLog(@"%@",self);

}
@end
